-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create leaderboard info component #606
Create leaderboard info component #606
Conversation
|
Name | Link |
---|---|
🔨 Latest commit | 40c2a83 |
6ff7fe1
to
1e46496
Compare
|
||
const isMobile = | ||
window.innerWidth <= | ||
parseInt(resolveConfig(tailwindConfig).theme.screens.sm.replace('px', ''), 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick note: parseInt()
default is supposed to be 10
however ya you want to explicitly do it because sometimes it isn't for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and that's why I wrote that, because I remember reading about that years ago. Anyway; this okay with you? I figured we don't need to worry about users changing their browser sizes after loading the page, so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ya this doesn't change. We want to have the site be responsive, like for myself i may open it up on one monitor in half the size (snapped to half the screen) then oh i need to really look, let me maximize (or vice versa). Mobile first responsive design is the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be reactive now. Took a while to figure out, because it wasn't watchThrottled
that I could use, as watching window.innerWidth
doesn't trigger anything. Turns out there's useThrottleFn
, which even gives our exact use case as the example, lmao
89fef39
to
0517c5b
Compare
And some substitutes, really
Sorry this is a huge commit
9739ef6
to
40c2a83
Compare
What
Adds the LeaderboardInfo component (really two components, one for desktop and mobile):
Link to Issue
Closes #546
Acceptance
Steps for testing
pnpm test
Images